package com.example.express.service.impl;

import com.example.express.bean.User;
import com.example.express.dao.impl.UserDaoImpl;
import com.example.express.service.BaseUserService;

import java.util.List;
import java.util.Map;

public class UserServiceImpl implements BaseUserService {
    private UserDaoImpl dao = new UserDaoImpl();
    @Override
    public List<Map<String, Integer>> console() {
        return dao.console();
    }

    @Override
    public List<User> findAll(boolean limit, int offset, int pageNum) {
        return dao.findAll(limit,offset,pageNum);
    }

    @Override
    public User findByPhoneNum(String phoneNumber) {
        return dao.findByPhoneNum(phoneNumber);
    }

    @Override
    public boolean insert(User user) {
        return dao.insert(user);
    }

    @Override
    public boolean update(int id, User user) {
        return dao.update(id,user);
    }

    @Override
    public boolean delete(int id) {
        return dao.delete(id);
    }
}
